<?php
/**
* 
*/
class managecontroller extends Platfromcontroller
{
	
	function index(){
		$this->display('index.html');
	}
	function master(){
		$model=modelfactory::M('mastermodel');
		$master=$model->master();
		
		$this->assign('master',$master);
		$this->display('master.html');
	}
	function update(){
		$master=array();
		$master['name']=$this->escapeData($_POST['name']);
		$master['job']=$this->escapeData($_POST['job']);
		$master['home']=$this->escapeData($_POST['home']);
		$master['tel']=$this->escapeData($_POST['tel']);
		$master['email']=$this->escapeData($_POST['email']);
		$model=modelfactory::M('mastermodel');
		$massige=$model->update($master);
		if($massige!==(bool)false){
		$this->jump('http://www.boke.com/index.php?p=admin&c=manage&a=master','修改成功');
	}else{
		$this->jump('http://www.boke.com/index.php?p=admin&c=manage&a=master',':(修改失败');
	}
}
}